Release 10.1A: OpenEdge Data Management:
SQL Reference
REVOKE
Revokes various privileges from the specified users of the database. There are two forms of the
REVOKEstatement:This is the syntax to
REVOKEdatabase-wide privileges:Syntax
RESOURCERevokes from the specified users the privilege to issue
CREATEstatements.DBARevokes from the specified users the privilege to create, access, modify, or delete any database object, and revokes the privilege to grant other users any privileges.
AUDIT_ADMINRevokes from the specified users the privilege to administrate and maintain a database auditing system.
AUDIT_ARCHIVERevokes from the specified users the privilege to read and delete audit records.
AUDIT_INSERTRevokes from the specified users the privilege to insert application audit records.
FROM username [ , username ] , ...Revokes the specified privileges on the table or view from the specified list of users.
RESTRICT | CASCADEPrompts SQL to check to see if the privilege being revoked was passed on to other users. This is possible only if the original privilege included the
WITH GRANT OPTIONclause. If so, theREVOKEstatement fails and generates an error. If the privilege was not passed on, theREVOKEstatement succeeds.If the
REVOKEstatement specifiesCASCADE, revoking the access privileges from a user also revokes the privileges from all users who received the privilege from that user.If the
Note:REVOKEstatement specifies neitherRESTRICTnorCASCADE, the behavior is the same as forCASCADE.CASCADEis not supported forAUDIT_ADMIN,AUDIT_ARCHIVE,andAUDIT_INSERTprivileges. The only user who can revoke an audit privilege is the user who granted it. ExampleIn this example, the audit administration privilege is revoked from bsmith:
This is the syntax to
REVOKEprivileges on specific tables and views:Syntax
GRANT OPTION FORRevokes the
GRANToption for the privilege from the specified users. The actual privilege itself is not revoked. If specified withRESTRICT, and the privilege is passed on to other users, theREVOKEstatement fails and generates an error. Otherwise,GRANTOPTIONFORimplicitly revokes any privilege the user might have given to other users.privilegeThis is the syntax for the
privilegeitem:
privilege [ , privilege ] , ... | ALL [ PRIVILEGES ]List of privileges to be revoked. See the description in the
GRANTstatement. RevokingRESOURCEandDBAprivileges can only be done by the administrator or a user withDBAprivileges.If more than one user grants access to the same table to a user, then all the grantors must perform a revoke for the user to lose access to the table.
Using the keyword
ALLrevokes all the privileges granted on the table or view.FROM PUBLICRevokes the specified privileges on the table or view from any user with access to the system.
RESTRICT | CASCADEPrompts SQL to check to see if the privilege being revoked was passed on to other users. This is possible only if the original privilege included the
WITH GRANT OPTIONclause. If so, theREVOKEstatement fails and generates an error. If the privilege was not passed on, theREVOKEstatement succeeds.If the
REVOKEstatement specifiesCASCADE, revoking the access privileges from a user also revokes the privileges from all users who received the privilege from that user.If the
ExampleREVOKEstatement specifies neitherRESTRICTnorCASCADE, the behavior is the same as forCASCADE.
Note: If the username specified in a
GRANT DBAorGRANT RESOURCEoperation does not already exist, theGRANTstatement creates a row in theSYSDBAUTHsystem table for the new username. This row is not deleted by a subsequentREVOKEoperation.Authorization
Must have the
DBAprivilege or ownership of the table (to revoke privileges on a table). To revoke audit privileges, the user must have theDBAprivilege orAUDIT ADMINISTRATION WITH GRANTprivilege and be the user who granted the audit privilege.Related statements
GRANT
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |